#include <iostream>

using namespace std;

#include "Foul.h"
#include "Event.h"


Foul::Foul() : Event()
{
//placeholder
}

Foul::Foul(string type, Time t) :Event (type, t)
{
//placeholder
}


bool Foul::assignValues()
{
bool inputCheck=true;
m_eventType="F";
cin>>m_eventTime;
m_eventTime.reverseTime();
cin>>m_team;
cin>>m_commitPlayer;
cin>>m_playerFouled;
getline(cin,describe);

//Check all inputs for proper values
	if ((m_team!='A')&&(m_team!='a')&&(m_team!='h')&&(m_team!='H'))
	{
	inputCheck=false;
	}
	if ((m_playerFouled < 0)||(m_playerFouled >100) || (m_commitPlayer < 0)||(m_commitPlayer >100))
	{
	inputCheck=false;
	}

return inputCheck;
}

Player Foul::getPlayerFouled()
{
return Player(m_playerFouled);
}

